package com.haier.nengyuan.myapplication;

import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * Created by liuxinming on 17-9-4.
 */

public class ShutdownBroadcastReceiver extends BroadcastReceiver {
    private static final String TAG = "ShutdownBroadcastReceiver";

    private static final String ACTION_SHUTDOWN = "android.intent.action.ACTION_SHUTDOWN";

    @SuppressLint("LongLogTag")
    @Override
    public void onReceive(Context context, Intent intent) {

        if (intent.getAction().equals(ACTION_SHUTDOWN)) {
            Log.i(TAG, "ShutdownBroadcastReceiver onReceive(), Do thing!");
//            context.stopService(new Intent(context, ExampleService.class));
        }
    }
}
